<template>
  <div class="flex">
    <svg-icon icon-class="user" class-name="icon" />
    <h2>我是 user 页面</h2>
  </div>
</template>

<script>
export default {
  name: 'IndexUser',
  async asyncData({ $api }) {
    console.log($api);
    // console.log(e)
    // const { data } = await axios.get(`https://my-api/posts/${params.id}`)
    // const data = await e.$axios.$get('http://192.168.31.142:3001/api/tabList')
    const [data] = await Promise.all([$api.common.getTabList()])
    // console.log(data)
    return { tabList: data.data }
  },
}
</script>
<style lang="scss" scoped>
.icon {
  font-size: 30px;
}
</style>
